#pragma once

#include <QtWidgets/QWidget>
#include "ui_Downloader.h"
#include "httpDownload.h"

class Downloader : public QWidget
{
    Q_OBJECT

public:
    Downloader(QWidget *parent = Q_NULLPTR);
    ~Downloader();
public slots:
    void slotProgress(qint64 bytesReceived, qint64 bytesTotal, const QString& strSpeed);
    void slotDownloadErorr(const QString& errStr);
    void slotStartDownload();
    void slotDownloadFinished();

private:
    void connectSigSlot();

private:
    Ui::DownloaderClass ui;
    httpDownload* m_pDownloader = nullptr;
    QString m_dir;
};
